import java.util.Objects;

class Person {
    private String name;
    private int age;

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public boolean equals(Object obj) {
        Person person = (Person) obj;
        if (this.name.equals(person.name) && this.age == person.age) {
            return true;
        }else {
            return false;
        }
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, age);
    }
}

class Student {

}

public class Test {

    public static void main(String[] args) {
        Person person1 = new Person("张三", 19);
        Person person2 = new Person("张三", 19);
        //System.out.println(person1.equals(person2));

        Person per1 = new Person("zhangsan", 20) ;
        Person per2 = new Person("zhangsan", 20) ;
        System.out.println(per1.hashCode());
        System.out.println(per2.hashCode());
    }
}
